From: Karl Heuer Date: Fri, 25 Mar 1994 03:03:24 +0000 (+0000) Subject: (apropos-match-keys): Skip duplicate keybindings. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~92536 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ee829a877650ae3075d1de469cdc00503c5d340f;p=emacs.git (apropos-match-keys): Skip duplicate keybindings. --- diff --git a/lisp/apropos.el b/lisp/apropos.el index 53bbe1673b7..1cd37310e1c 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -277,6 +277,9 @@ Returns list of symbols and documentation found." (not (setq local (lookup-key current-local-map key))) (numberp local) (eq command local)) + ;; check if this binding is already recorded + ;; (this can happen due to inherited keymaps) + (not (member key (nthcdr 3 item))) ;; add this key binding to the item in alist (nconc item (cons key nil)))) ((vectorp (car map)) @@ -305,6 +308,9 @@ Returns list of symbols and documentation found." (not (setq local (lookup-key current-local-map key))) (numberp local) (eq command local)) + ;; check if this binding is already recorded + ;; (this can happen due to inherited keymaps) + (not (member key (nthcdr 3 item))) ;; add this key binding to the item in alist (nconc item (cons key nil))) (setq i (1+ i))))))